SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[postcheck_month_quality_report](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[PROBLEM_ID] [int] NULL,
	[YEAR] [smallint] NOT NULL,
	[MONTH] [tinyint] NOT NULL,
	[QUALITY_REPORT] [varbinary](max) NOT NULL,
 CONSTRAINT [PK_postcheck_month_quality_report] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[deleted_postcheck_month_sanwei_report](
	[ID] [int] NOT NULL,
	[PROBLEM_ID] [int] NULL,
	[YEAR] [smallint] NOT NULL,
	[MONTH] [tinyint] NOT NULL,
	[DEPARTMENT1_ID] [int] NULL,
	[SANWEI_REPORT] [varbinary](max) NOT NULL,
 CONSTRAINT [PK_deleted_postcheck_month_sanwei_report] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


-- 作业部填报《岗检考核汇总》，上报
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(7,8 ,3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(7,6 ,3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(7,5 ,3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(7,4 ,3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(7,3 ,3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(7,2 ,3, 1)
go

--处室填报《三违汇总》，上报
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(8,10 ,3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(8,11 ,3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(8,12 ,3, 1)
go

update tendency_type set TENDENCY_TYPE = '火灾爆炸', DEPARTMENT1_ID = 35 where ID= 1

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[hse_month_report](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[YEAR] [smallint] NOT NULL,
	[MONTH] [tinyint] NOT NULL,
	[DEPARTMENT1_ID] [int] NULL,
	[EQUIPMENT_ID] [int] NULL,
	[COMPARE_REPORT] [varbinary](max) NOT NULL,
 CONSTRAINT [PK_hse_month_report] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO